package org.fund.common.constant;

import io.swagger.models.auth.In;

/**
 * @Author Moro
 * @Date 2022/3/15 21:41
 * @title HolidayEnum
 */
public enum HolidayEnum {
    COMMON(0,"工作日"),
    WEEKEND(1,"周末"),
    HOLIDAY(2,"节假日");

    private int code;
    private String description;

    HolidayEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public  static HolidayEnum getInstance(int code){
        for (HolidayEnum value : HolidayEnum.values()) {
            if (value.getCode()==code){
                return value;
            }
        }
        return null;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
